package org.jeecg.enums;
//短信业务类型
public enum SmsBusinessTypeEnum {
    SMS_METER("0","仪表低电量提醒"),
    SMS_CAR_001("CAR001","月卡车到期提醒"),
    ;


    private String code;
    private String desc;

    SmsBusinessTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }


    public static String getDesc(Integer value) {
        if (value == null) return "";
        SmsBusinessTypeEnum[] enums = values();
        for (SmsBusinessTypeEnum typeEnum : enums) {
            if (value.equals(typeEnum.getCode())) {
                return typeEnum.desc;
            }
        }
        return "";
    }

    public static String getValue(String desc) {
        SmsBusinessTypeEnum[] enums = values();
        for (SmsBusinessTypeEnum typeEnum : enums) {
            if (typeEnum.getDesc().equals(desc)) {
                return typeEnum.code;
            }
        }
        return null;
    }
}
